/*
 * InputHDF5.cpp
 *
 *  Created on: Aug 9, 2013
 *      Author: paste
 */

#include "InputHDF5.h"

#include "H5Cpp.h"

H5::DataSet InputHDF5::Traverse(const char* path) const
{
  H5G_stat_t statbuf;
  try {
    myFile.getObjinfo(path, statbuf);
  } catch (...) {
    // TODO throw something sensible
  }

  if (statbuf.type == H5G_DATASET) {
    return myFile.openDataSet(path);
  }

  // TODO throw something reasonable
  throw std::exception();
}
